package U5;

public class Test2 {
	public class TreeNode {
		int val = 0;
		TreeNode left = null;
		TreeNode right = null;

		public TreeNode(int val) {
			this.val = val;
		}
	}

	public String toSequence(TreeNode root) {
		if (root == null) {
			return "";
		}
		return "(" + toSequence(root.left) + toSequence(root.left) + ")";
	}
}
